@import 'normalize.css';
@import 'font-awesome.min.css';

/* color */

$colorblue: #02335b; //深蓝
$colorgreen: #95d800; //绿色
$colorred: #cc3333; //红色
$colorgray: #cccccc; //灰色
$colorgroup1:#c8fbac;
$colorgroup2:#73d290;
$colorgroup3:#7ed7f5;
$colorgroup4:#f7d25f;
$colorgroup5:#91c6fa;
$colorgroup6:#81e8a1;
$colorgroup7:#74aeee;

/* clearfloat */

%clearfloat {
  *zoom: 1;
  &:after {
    content: "";
    clear: both;
    display: block;
    height: 0;
    visibility: hidden;
  }
}


/* oneline */

%oneline {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* -------------custom style starting------------- */

%boxshadow1 {
  box-shadow: 1px 1px 3px rgba(black, .3);
}

%boxshadow2 {
  box-shadow: 1px 1px 3px rgba(black, .6);
}

%textshadow {
  text-shadow: 0 -1px 1px rgba(black, .3);
}

%borderradius {
  border-radius: .25em;
}

%fontyahei {
  font-family: "Microsoft Yahei";
}

%fontsongti {
  font-family: "宋体";
}

%fontkaiti {
  font-family: "楷体";
}

%fontheiti {
  font-family: "黑体";
}

%fontfangsong {
  font-family: "仿宋";
}


/* -------------custom style ending------------- */


/* mask */

//.mask {
//  position: fixed;
//  left: 0;
//  right: 0;
//  top: 0;
//  bottom: 0;
//  background-color: rgba(black, .6);
//}

/* login */

.login {
  $width: 300px;
  width: $width + 4;
  //  position: fixed;
  //  left: 50%;
  //  top: 20%;
  //  margin-left: -($width / 2);
  border: 2px solid $colorgreen;
  box-sizing: border-box;
  @extend %boxshadow1;
  animation: testanimations .1s linear;
  @keyframes testanimations {
    0% {
      transform: scale(1);
    }
    50% {
      transform: scale(1.1);
    }
    100% {
      transform: scale(1);
    }
  }
  ul {
    list-style: none;
    width: $width;
    overflow: hidden;
    padding: 0;
    margin: 0;
    background-color: white;
    .selected {
      display: none;
    }
    li {
      float: left;
      width: 100%;
      height: 50px;
      line-height: 50px;
      text-align: left;
      font-weight: bold;
      box-sizing: border-box;
      padding-left: 1em;
      font-size: 1em;
      color: $colorblue;
      cursor: pointer;
      @extend %fontyahei;
      &:nth-of-type(1) {
        background: url(../img/login-saoma.png) right center no-repeat;
        background-size: 50px;
        position: relative;
        &:after {
          content: "扫码登录在这里→";
          display: inline-block;
          position: absolute;
          top: 14px;
          right: 40px;
          color: $colorblue;
          @extend %fontyahei;
          font-size: 10px;
          opacity: .8;
          border: 1px solid rgba($colorgreen, .3);
          @extend %borderradius;
          height: 20px;
          line-height: 20px;
          font-weight: normal;
        }
      }
      &:nth-of-type(2) {
        background: url(../img/login-mima.png) right center no-repeat;
        background-size: 50px;
      }
      //      a {
      //        text-decoration: none;
      //        display: block;
      //        height:50px;
      //        width:100%;
      //        //background-color: rgba($colorgreen, .3);
      //        outline: none;
      //        &:hover {
      //          //text-decoration: underline;
      //        }
      //      }
    }
  }
  .fieldset {
    margin: 0;
    overflow: hidden;
    position: relative;
    margin-bottom: 14px;
    line-height: 18px;
  }
  .codelogin {
    display: none;
    p {
      margin: 5px;
    }
    p:first-child {
      text-align: center;
      font-size: 0;
    }
    p:nth-child(2) {
      color: $colorblue;
      font-size: 12px;
      text-align: justify;
    }
    p:nth-child(3) {
      font-size: 12px;
      text-align: center;
      a {
        text-decoration: none;
        color: $colorred;
      }
    }
  }
  .login-form {
    background-color: white;
    width: $width;
    box-sizing: border-box;
    padding: 15px 20px;
    min-height: 226px;
  }
  .username-icon,
  .password-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    margin-top: -15px;
    transform: scale(.7);
    background-image: url(../img/user-password.png);
    background-repeat: no-repeat;
    color: transparent;
    width: 30px;
    height: 30px;
  }
  label {
    font-size: 13px;
  }
  .username-icon {
    background-position: -32px 0;
  }
  .password-icon {
    background-position: 0 0;
  }
  #password,
  #username {
    width: 100%;
    padding: 10px 20px 10px 50px;
    font-size: 1em;
    border-radius: .25em;
    border: 1px solid #d2d8d8;
    box-sizing: border-box;
    outline: none;
    font-family: "Microsoft Yahei";
  }
  .forgetpassword {
    font-size: 13px;
    text-decoration: none;
    float: right;
    //margin-right: 20px;
    color: red;
  }
  .submit-button {
    display: inline-block;
    width: 100%;
    border-radius: .25em;
    background: rgba(#95d800, 1);
    padding: 8px 0;
    font-size: 1em;
    color: white;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    border-right: 2px solid rgba(black, .3);
    border-bottom: 2px solid rgba(black, .3);
    &:active {
      //      box-shadow: 1px 1px 3px rgba(black,.3) inset;
      border-left: 2px solid rgba(black, .3);
      border-top: 2px solid rgba(black, .3);
      border-right: none;
      border-bottom: none;
    }
  }
  .err-msg {
    color: red;
    font-size: 14px;
  }
}


/* searchbook-index */

.booksearch-index {
  $width: 80%;
  width: $width;
  margin: 0 auto;
  background-image: linear-gradient(to top, $colorblue, rgba($colorblue, .7));
  padding: 20px 4%;
  box-sizing: border-box;
  @extend %boxshadow2;
  @extend %borderradius;
  .formfloat {
    text-align: center;
  }
  select,
  input,
  a,
  span {
    display: inline-block;
    @extend %fontyahei;
    @extend %borderradius;
    outline: none;
    padding: 5px 1%;
    border: none;
    box-sizing: border-box;
    font-size: 14px;
  }
  //  select {
  //    margin-right: 3%;
  //    width: 15%;
  //    &:nth-of-type(2) {
  //      margin-left: 1%;
  //    }
  //  }
  input {
    width: 60%;
  }
  a {
    width: 20%;
    text-align: center;
    text-decoration: none;
    background-color: $colorgreen;
    color: white;
    margin-left: 3%;
  }
  span {
    width: 14%;
    color: white;
    //font-size: 1.1em;
  }
}


/* reader-menu */

.reader-menu {
  width: 100%;
  @extend %clearfloat;
  .reader-menu-item {
    position: relative;
    display: block;
    height: 60px;
    width: 13%;
    margin: 0;
    padding: 0;
    float: left;
    overflow: hidden;
    @extend %borderradius;
    background-size: 24px!important;
    &:hover {
      box-shadow: 0 0 5px rgba($colorgreen, 1), 0 0 7px rgba($colorgreen, 1);
      transition: all .2s linear;
      p{
        transform: rotateY(360deg);
        transition: all .5s linear;
      }
    }
    &:nth-of-type(1) {
      background: $colorgroup1 url(../img/usercenter1.png) center 10px no-repeat;
    }
    &:nth-of-type(2) {
      background: $colorgroup2 url(../img/usercenter2.png) center 10px no-repeat;
    }
    &:nth-of-type(3) {
      background: $colorgroup3 url(../img/usercenter3.png) center 10px no-repeat;
    }
    &:nth-of-type(4) {
      background: $colorgroup4 url(../img/usercenter4.png) center 10px no-repeat;
    }
    &:nth-of-type(5) {
      background: $colorgroup5 url(../img/usercenter5.png) center 10px no-repeat;
    }
    &:nth-of-type(6) {
      background: $colorgroup6 url(../img/usercenter6.png) center 10px no-repeat;
    }
    &:nth-of-type(7) {
      background: $colorgroup7 url(../img/usercenter7.png) center 10px no-repeat;
    }
    p {
      margin: 0;
      padding: 0;
      position: absolute;
      left: 0;
      right: 0;
      bottom: 10px;
      font-size: 10px;
      text-align: center;
      @extend %fontyahei;
      @extend %oneline;
      color: $colorblue;
    }
  }
  .message-count {
    color: white;
    text-decoration: none;
    display: inline-block;
    position: absolute;
    right: 20%;
    top: 10%;
    width: 20px;
    text-align: center;
    background-color: $colorred;
    border-radius: 100%;
    font-size: 12px;
    padding: 2px 0;
  }
  .reader-menu-item+.reader-menu-item {
    margin-left: 1.5%;
  }
}
